PlayerData = { };

table.insert( PlayerData,
	{

		Name = "Sorin",
		NiceName = "Sorin Strong",
		
		HP = 45,
		Power = 12,
		Defense = 5,
		Speed = 22,
		Luck = 7,

		Scale = 2,
		
		MoveSet =
		{

			{

				ID = 1,
				AnimID = 1,
				MenuText = "Attack",
				Text = " attacks!!",
				RepeatMin = 3,
				RepeatMax = 3,
				DmgMin = 0.25, DmgMax = 0.45,
				Think = function( player, enemy, adi )
			
					local ad = AttackThinkData[adi];
					
					if( not ad.OrigPos ) then
						
						ad.OrigPos = player:GetPos();
						ad.HeadToOrigPos = false;
						ad.HitAnim = false;
						ad.HitCount = 0;
						ad.NextHit = 0;
					
					end
				
					if( not ad.HitEnemy and not ad.HeadToOrigPos ) then
						
						player:SetCurrentSprite( 2 );
						player:SetConstantVelocity( -530, 0 );
					
						local pos = player:GetPos();
						local size = enemy:GetSize();
						
						if( pos.x < enemy:GetPos().x + size.w + 10 ) then
							
							ad.HitEnemy = true;
							ad.HitTime = GetTicks() + 1050;
							ad.HitAnim = true;
							ad.NextHit = GetTicks() + 60;
							player:SetConstantVelocity( 0, 0 );
							player:SetCurrentSprite( 1 );
							
						end
						
					end
					
					if( ad.HitEnemy and GetTicks() > ad.HitTime ) then
						
						player:SetCurrentSprite( 2 );
						ad.HeadToOrigPos = true;
						ad.HitEnemy = false;
						
						
					end
					
					if( ad.HitAnim and ad.HitCount < 3 ) then
						
						if( GetTicks() > ad.NextHit ) then
							
							player:GenerateHit( enemy, 1 );
							ad.NextHit = GetTicks() + 300;
							ad.HitCount = ad.HitCount + 1;
							
						end
						
					end
					
					if( ad.HeadToOrigPos ) then
						
						local pos = player:GetPos();
						
						player:SetConstantVelocity( 530, 0 );
						player:SetCurrentSprite( 2 );
						
						if( pos.x > ad.OrigPos.x ) then
							
							player:SetCurrentSprite( 0 );
							player:SetPos( ad.OrigPos.x, pos.y );
							player:SetConstantVelocity( 0, 0 );
							return false;
							
						end
						
					end
					
						
					--[[
					if( not ad.EndAttack ) then
						
						ad.EndAttack = GetTicks() + 1000;
						
					end
					
					if( not ad.Pause ) then
				
						ad.Pause = GetTicks() + 600;
						ad.ChangedAnim = false;
						
						
					end
					
					if( not ad.ChangedAnim ) then
						
						--player:SetCurrentSprite( 1 );
						ad.ChangedAnim = true;
						
					end
					
					if( GetTicks() > ad.Pause and not ad.Attacked ) then
	
						enemy:SetAnimating( false );
						player:GenerateHit( enemy );
						ad.Attacked = true;
						
					end
					
					if( GetTicks() > ad.EndAttack ) then
						
						enemy:SetAnimating( true );
						player:SetCurrentSprite( 0 );
						return false;
						
					end
					]]--
					
					return true;

				end

			},

		},
		MoveCount = 1,

		IdleAnimID = 1,
		Sprites = 
		{

			"Graphics/Sprites/Battle/Sorin/idle.spr",
			"Graphics/Sprites/Battle/Sorin/punch.spr",
			"Graphics/Sprites/Battle/Sorin/run.spr",

		},
		SpriteCount = 2,


	} );


PlayerData.Count = #PlayerData + 1;
Engine.AddBattleStats( PlayerData );
